package com.wyh.lotterysystem.controller.request;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NonNull;

import java.util.Date;
import java.util.List;

@Data
public class DrawPrizeRequest {
    @NotNull(message = "活动id不能为空")
    private Integer activityId;

    @NotNull(message = "奖品id不能为空")
    private Integer prizeId;

//    @NotBlank(message = "奖品等级不能为空")
//    private String prizeTiers;

    @NotNull(message = "中奖时间不能为空")
    private Date winningTime;

    @NotEmpty(message = "中奖名单不能为空")
    @Valid
    private List<Winner> winnerList;

    @Data
    public static class Winner{
        @NotNull(message = "中奖人id不能为空")
        private Integer userId;

        @NotBlank(message = "中奖人名称不能为空")
        private String userName;
    }
}
